package com.kexuexiong.demo.bear.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * <p>
 *
 * </p>
 *
 * @author kexuexiong
 * @since 2023-03-22
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
public class Person extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiParam("id")
    private Long id;

    /**
     * 年龄
     */
    @ApiParam("age")
    private Integer age;

    /**
     * 名字
     */
    @ApiParam("name")
    private String name;

    public Person(long id, int age, String name, boolean delete) {
        this.id = id;
        this.age = age;
        this.name  = name;
        this.setDeleted(delete);
    }
}
